export const statusOptions = [
    // {
    //     label: '全部',
    //     value: ''
    // },
    {
        label: '生效',
        value: 0
    },
    {
        label: '暂存',
        value: 1
    },
    {
        label: '停用',
        value: 2
    },
    {
        label: '驳回',
        value: 7
    },
    {
        label: '审批中',
        value: 8
    },
    {
        label: '作废',
        value: 9
    },
]

export const handleServiceStatusText = (status) => {
    switch (status) {
        case '0':
            return '生效'
        case '1':
            return '暂存'
        case '2':
            return '停用'
        case '7':
            return '驳回'
        case '8':
            return '审批中'
        case '9':
            return '作废'
        default:
            break;
    }
}

export const handleServiceTypeText = (type) => {
    if (type === '1') {
        return 'webservice'
    } else if (type === '2') {
        return 'restful'
    } else {
        return 'jms'
    }
}

export const handleServiceReleaseTypeText = (type) => {
    if (type === '1') {
        return 'API直连'
    } else if (type === '2') {
        return '复合编排'
    } else if (type === '3') {
        return '协议转换'
    } else if(type === '4') {
        return '数据接口'
    } else if(type === '9'){
        return '专家模式'
    }
}
